﻿using System;
using System.Collections.Generic;

namespace timetable
{
    [Serializable]
    public class Group
    {
        public int count;

        public Dictionary<string, string> Details { get; set; }
        public Dictionary<string, string> Common { get; set; }
        public Dictionary<string, string> Special { get;set; }
        public Dictionary<string, string> ClassDetails { get; set; } // 存储最后的班级情况
        public Curriculum Curriculum;


        public Group()
        {
            Details = new Dictionary<string, string>();
            Common = new Dictionary<string, string>();
            Special = new Dictionary<string, string>();
            ClassDetails = new Dictionary<string, string>();
            // 每个分组采用默认的课程表初始化
            // TODO 是否考虑教室课时等问题
            Curriculum = new Curriculum();
        }

        public Group(Group group)
        {
            count = group.count;
            Details = new Dictionary<string, string>(group.Details);
            Common = new Dictionary<string, string>(group.Common);
            Special = new Dictionary<string, string>(group.Special);
            ClassDetails = new Dictionary<string, string>(group.ClassDetails);
            Curriculum = new Curriculum(group.Curriculum);
            
        }
    }

    class DiffGroup
    {
        public int resultSubscript;
        public int bufferSubscript;
        public int Count { get { return Special.Count; } private set { } }
        public Dictionary<string, string> Special;

        public DiffGroup()
        {
            Special = new Dictionary<string, string>();
        }
    }

    internal class DiffThreeGroup
    {
        public int resultListSubscript;
        public int bufferSubscript;

        public int CommonCount
        {
            get { return Common.Count; }
            private set { }
        }

        public int SpecialCount { get; set; }
        public Dictionary<string, string> Common { get; set; }

        public DiffThreeGroup()
        {
            Common = new Dictionary<string, string>();
        }
    }
}
